﻿<controls:ChildWindow xmlns:data="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"  x:Class="IndexMarkSilverlightClient.Views.OrderedVolums"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           xmlns:my="clr-namespace:IndexMarkSilverlightClient.Views.Controls"
           Width="400" Height="300" 
           xmlns:classes="clr-namespace:IndexMarkSilverlightClient.Classes" xmlns:Controls="clr-namespace:SharedCode.Controls;assembly=SharedCode" Title="Объемы по показателю">

    <controls:ChildWindow.Resources>
        <classes:NullableFloatToHideConverter x:Key="NullableFloatToHideConverter"/>
    </controls:ChildWindow.Resources>
    
    <Grid x:Name="LayoutRoot" Margin="2">

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Vertical"  Grid.Row="0" >
            <TextBlock Text="{Binding Characteristic}" TextWrapping="Wrap" Margin="5" x:Name="CharTB"/>
            <TextBlock Text="{Binding Gradation}" TextWrapping="Wrap" Margin="5" x:Name="GradTB"/>
        </StackPanel>

        <data:DataGrid AutoGenerateColumns="False" x:Name="VolumsGrid" Grid.Row="1">
            <data:DataGrid.Columns>
                <data:DataGridTextColumn Binding="{Binding Order}" Header="№"/>
                <data:DataGridTextColumn Binding="{Binding Name, Converter={StaticResource NullableFloatToHideConverter}}" Header="ФИО"/>
                        <data:DataGridTextColumn Binding="{Binding Volume, Converter={StaticResource NullableFloatToHideConverter}}" Header="Объем"/>
            </data:DataGrid.Columns>
        </data:DataGrid>

        <Button x:Name="OKButton" Content="OK" Click="OKButton_Click" Width="75" Height="23" HorizontalAlignment="Right" Margin="0,12,0,0" Grid.Row="2" />
        
        <Controls:LoadingBar Action="загрузка" Grid.RowSpan="3" VerticalAlignment="Center" HorizontalAlignment="Center" x:Name="loadingBar"/>
    </Grid>
</controls:ChildWindow>